--- xen/console/console.c 2005-11-02 14:13:07.000000000 +0100
+++ xen.patched/console/console.c 2005-11-02 14:21:20.000000000 +0100
-@@ -196,6 +196,9 @@
- void xen_console_init(void)
- #endif
- {
-+ if (xen_init() < 0)
-+ return __RETCODE;
-+
- if (xen_start_info->flags & SIF_INITDOMAIN) {
- if (xc_mode == XC_DEFAULT)
- xc_mode = XC_SERIAL;
@@ -768,9 +771,15 @@
#endif
diff -Naur xen/core/devmem.c xen.patched/core/devmem.c
--- xen/core/devmem.c 2005-09-23 10:54:50.000000000 -0600
+++ xen.patched/core/devmem.c 2005-09-23 10:57:51.000000000 -0600
-@@ -93,6 +93,9 @@
- if (uncached_access(file))
- vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
-
-+#ifdef __ia64__
-+#define direct_remap_pfn_range(a,b,c,d,e,f) remap_pfn_range(a,b,c,d,e)
-+#endif
- if (direct_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff,
- vma->vm_end - vma->vm_start,
- vma->vm_page_prot, DOMID_IO))
diff -Naur xen/core/gnttab.c xen.patched/core/gnttab.c
--- xen/core/gnttab.c 2005-09-23 10:54:50.000000000 -0600
+++ xen.patched/core/gnttab.c 2005-09-23 10:57:51.000000000 -0600
-@@ -19,6 +19,10 @@
- #include <asm-xen/gnttab.h>
- #include <asm/synch_bitops.h>
-
-+#ifdef __ia64__
-+#define synch_cmpxchg ia64_cmpxchg4_acq
-+#endif
-+
- #if 1
- #define ASSERT(_p) \
- if ( !(_p) ) { printk(KERN_ALERT"Assertion '%s': line %d, file %s\n", \
@@ -346,6 +350,10 @@
if ( hypercall.op != __HYPERVISOR_grant_table_op )
return -ENOSYS;
set_fixmap(FIX_GNTTAB_END - i, frames[i] << PAGE_SHIFT);
+#endif
- return 0;
- }
-@@ -434,8 +448,10 @@
- {
- int i;
-
-+#ifndef __ia64__
- for (i = 0; i < NR_GRANT_FRAMES; i++)
- clear_fixmap(FIX_GNTTAB_END - i);
-+#endif
-
return 0;
}
@@ -450,7 +466,9 @@
diff -Naur xen/privcmd/privcmd.c xen.patched/privcmd/privcmd.c
--- xen/privcmd/privcmd.c 2005-09-23 10:54:50.000000000 -0600
+++ xen.patched/privcmd/privcmd.c 2005-09-23 10:57:51.000000000 -0600
-@@ -134,6 +134,9 @@
- > vma->vm_end )
- return -EINVAL;
-
-+#ifdef __ia64__
-+#define direct_remap_pfn_range(a,b,c,d,e,f) remap_pfn_range(a,b,c,d,e)
-+#endif
- if ((rc = direct_remap_pfn_range(
- vma,
- msg[j].va&PAGE_MASK,
@@ -180,6 +183,15 @@
for (i = 0; i < m.num; i++, addr += PAGE_SIZE, p++) {
if (get_user(mfn, p))
#include <asm/pgalloc.h>
#include <asm/uaccess.h>
#include <asm/io.h>
+#include <asm/hypervisor.h>
static inline int uncached_access(struct file *file)
{
#include <linux/spinlock.h>
#include <asm-xen/balloon.h>
+#include <asm/hypervisor.h>
#include "common.h"
/*
int i;
struct page *page;
+ if (xen_init() < 0)
+ return -ENODEV;
+
blkif_interface_init();
page = balloon_alloc_empty_page_range(MMAP_PAGES);
#include <asm-xen/xenbus.h>
#include <asm-xen/xen-public/grant_table.h>
#include <asm-xen/gnttab.h>
+#include <asm/hypervisor.h>
#define BLKIF_STATE_DISCONNECTED 0
#define BLKIF_STATE_CONNECTED 1
static int __init xlblk_init(void)
{
+ if (xen_init() < 0)
+ return -ENODEV;
+
xenbus_register_driver(&blkfront);
return 0;
}
void xen_console_init(void)
#endif
{
+ if (xen_init() < 0)
+ return __RETCODE;
+
if (xen_start_info->flags & SIF_INITDOMAIN) {
if (xc_mode == XC_DEFAULT)
xc_mode = XC_SERIAL;
#include <linux/pagemap.h>
#include <linux/seq_file.h>
#include <linux/kthread.h>
+#include <asm/hypervisor.h>
#include <asm/pgalloc.h>
#include <asm/pgtable.h>
-/* empty */
+#define clear_fixmap(x) do {} while (0)
+#define set_fixmap(x,y) do {} while (0)
return test_bit(nr, addr);
}
+#define synch_cmpxchg ia64_cmpxchg4_acq
+
#define synch_test_bit(nr,addr) \
(__builtin_constant_p(nr) ? \
synch_const_test_bit((nr),(addr)) : \